<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
//    return view('welcome');

});

Route::get('/getUrl', 'GetVideoUrl@getUrl');
Route::get('/uploadVideo', 'GetVideoUrl@uploadVideo');

//清理缓存
Route::get('/admin/delCache', function (){
    Illuminate\Support\Facades\Cache::flush();
    return '<script>
        swal("清理缓存成功！");
        window.history.back(-1); 
</script>';

});


Route::group(['prefix' => 'api'],function () {
        Route::post('/user/getOpenid', 'UserList@getOpenId');//获取openid
        Route::post('/index/advertList', 'VideoList@advertList');//广告设置
        Route::post('/index/videoList', 'VideoList@videoList');//首页视频列表
        Route::post('/index/videoInfo', 'VideoList@videoInfo');//视频详情
        Route::post('/user/addCollect', 'UserList@addCollect');//视频收藏添加接口
        Route::post('/user/delCollect', 'UserList@delCollect');//取消收藏接口
        Route::post('/user/myList', 'UserList@myList');//我的页面接口
    }
);
